═══ 1. Introduction ═══ Image Archiver v1.03 Image Archiver has been designed to facilitate the process of archiving JPEG images. The current release has been built upon the Indepent JPEG Group's version 4a JPEG compression/decompression software. This software currently supports the following image formats: o GIF o PPM/PGM o Targa Files to be compressed must be of one of the above types. Decompression of JPEG files can output to any of the above types also. The only JPEG file format currently supported is the JFIF format. Support for the TIFF 6.0 format will probably be added at some future date. ═══ 2. Main Dialog ═══ The Main Dialog presents top level information and functionality allowing images to be compressed, decompressed, deleted and viewed. Select one of the following sections for more information about a specific aspect of this dialog box. o JPEG Directory o Dir o JPEG File List o Other Directory o Other File List ═══ 2.1. JPEG Directory ═══ This Entry Field shows the current drive and directory where JPEG files are found. This field is Read Only. ═══ 2.2. JPEG File List ═══ This is the pride and joy of Image Archiver. This window presents a list of all of the JPEG files that were found in the JPEG Directory. Each entry in the list shows the following important information about the file: o File Name o Image Width o Image Height o File Size o Creation Date o Creation Time Multiple files can be selected for decompression or deletion with standard selection. Clicking mouse button 2 will popup the JPEG List Popup Menu Double-Clicking mouse button 1 on one of the files in the list will open that file for viewing. This is a much quicker way to view pictures that are in the current directory than by pressing the View button and selecting a file. ═══ 2.3. Other Directory ═══ This Entry Field shows the current drive and directory where Other supported files are found. This field is Read Only. ═══ 2.4. Other File List ═══ This is the pride and joy of Image Archiver. This window presents a list of all of the Other files that were found in the Other Directory. Each entry in the list shows the following important information about the file: o File Name o Image Width o Image Height o File Size o Creation Date o Creation Time Multiple files can be selected for compression or deletion with standard selection techniques. Clicking mouse button 2 will popup the Other List Popup Menu ═══ 2.5. Dir ═══ Pressing this button opens up the Change Directory dialog where you select the drive and directory to find the files for the file list. ═══ 2.6. JPEG List Popup Menu ═══ Pressing mouse button 2 on the JPEG file list pops up a menu with the following options. o Decompress o (Decompress) Options... o Deselect o Delete o View... o (View) Options... o Show Details ═══ 2.6.1. Decompress ═══ Selecting this menu item will cause Image Archiver to start decompressing all of the selected files in the JPEG file list. A progress monitor is provided to keep track of the process. Pressing Cancel will abort the rest of the conversion. ═══ 2.6.2. Decompress Options... ═══ Selecting this menu item will open up the Decompress Options Dialog dialog. This dialog does not have to be closed to continue processing. ═══ 2.6.3. View ═══ Selecting this menu item will open up a standard file dialog letting you select a JPEG image to view. ═══ 2.6.4. View Options... ═══ Selecting this menu item will open up the View Options Dialog dialog. This dialog does not have to be closed to continue processing. ═══ 2.6.5. Deselect ═══ Selecting this menu item will remove all of the selections from the file list. ═══ 2.6.6. Delete ═══ Selecting this menu item will show a message box asking for confirmation to delete all of the selected files in the file list. Press OK to continue. Press Cancel to abort the operation. ═══ 2.6.7. Show Details ═══ This menu item toggles whether or not Image Archiver gets the image width and height from the image file. Leaving this menu item checked will cause the Width and Height fields to be filled in. Leaving it unchecked will result in the Width and Height being displayed as 0. If you deal with large directories, you should leave this option unchecked for much faster directory loading. ═══ 2.7. Other List Popup Menu ═══ Pressing mouse button 2 on the Other file list pops up a menu with the following options. o Compress o (Compress) Options... o Deselect o Delete o Show Details ═══ 2.7.1. Compress ═══ Selecting this menu item will cause Image Archiver to start compressing all of the selected files in the Other file list. A progress monitor is provided to keep track of the process. Pressing Cancel will abort the rest of the conversion. ═══ 2.7.2. Compress Options... ═══ Selecting this menu item will open up the Compress Options Dialog dialog. This dialog does not have to be closed to continue processing. ═══ 2.7.3. Deselect ═══ Selecting this menu item will remove all of the selections from the file list. ═══ 2.7.4. Delete ═══ Selecting this menu item will show a message box asking for confirmation to delete all of the selected files in the file list. Press OK to continue. Press Cancel to abort the operation. ═══ 2.7.5. Show Details ═══ This menu item toggles whether or not Image Archiver gets the image width and height from the image file. Leaving this menu item checked will cause the Width and Height fields to be filled in. Leaving it unchecked will result in the Width and Height being displayed as 0. If you deal with large directories, you should leave this option unchecked for much faster directory loading. ═══ 3. Decompress Options Dialog ═══ The Decompress Options dialog box presents all of the settings that are related to decompressing JPEG files. Select one of the following sections for information about a specific setting. o Output Format o Colors o Max Memory o Quantize o Two-Pass Quant o Dither o Cross-Block Smooth o Grayscale ═══ 3.1. Output Format ═══ These radio buttons are used to determine the output format of the decompressed images. There are three image formats to choose from: o GIF -- Select GIF output. o PPM/PGM -- Select PGM output if Grayscale is selected, PPM otherwise. o Targa -- Select Targa output. ═══ 3.2. Colors ═══ This entry field specifies the number of colors to quantize the JPEG file to. This number is ignored if Quantize Valid ranges are 2 to 65536. ═══ 3.3. Max Memory ═══ This entry field specifies the maximum amount of memory in megabytes to allocate. If the amount of memory that needs to be allocated exceeds this value, then temporary files will be created for the excess. Generally, this value should be kept as high as possible. The process will become slower as the temporary files become larger. ═══ 3.4. Quantize ═══ Check this option to quantize the image to the number of colors specified by the Colors entry field and produce a colormapped output file in the selected format. If this option is not checked, then the output image will not be colormapped. Note that the GIF format requires this option to be checked and the number of colors to be 256 or less. ═══ 3.5. Two-Pass Quant ═══ Check this option to quantize the input image in two passes. This method takes more memory and more time than single pass quantizing, but it can result in much better image quality. This option is ignored if Quantize is not checked or if Grayscale is checked. ═══ 3.6. Dither ═══ Check this option to apply Floyd-Steinberg dithering when quantizing the input image. On some images this may result in undesirable "grainyness" in the output image. ═══ 3.7. Cross-Block Smooth ═══ Check this option to perform cross-block smoothing on the output image. This process is slow, memory intensive, and seems to only have positive results on images that were compressed with very low quality settings. In fact, this option may reduce the quality of standard quality images. ═══ 3.8. Grayscale ═══ Check this option to force the output image to grayscale regardless of the type of the input image. ═══ 4. View Options Dialog ═══ The View Options dialog box presents all of the settings that are related to viewing JPEG files. Select one of the following sections for information about a specific setting. o Size Window to Picture o Two-Pass Quant o Dither o Cross-Block Smooth o Grayscale o Max Memory ═══ 4.1. Size Window to Picture ═══ Check this option to optimally size the window to the size of the image being viewed. This causes the window to be sized no larger than the screen if the image is too big to fit. The window is also centered on the screen. If this options is not checked, then the window will be restored to it's last size and position. ═══ 4.2. Two-Pass Quant ═══ Check this option to quantize the input image in two passes. This method takes more memory and more time than single pass quantizing, but it can result in much better image quality. This option is ignored if Grayscale is checked. ═══ 4.3. Dither ═══ Check this option to apply Floyd-Steinberg dithering when quantizing the input image. On some images this may result in undesirable "grainyness" in the output image. ═══ 4.4. Cross-Block Smooth ═══ Check this option to perform cross-block smoothing on the output image. This process is slow, memory intensive, and seems to only have positive results on images that were compressed with very low quality settings. In fact, this option may reduce the quality of standard quality images. ═══ 4.5. Grayscale ═══ Check this option to force the output image to grayscale regardless of the type of the input image. Checking this option provides a way to quickly preview an image as no slow quantizing process takes place. ═══ 4.6. Max Memory ═══ This entry field specifies the maximum amount of memory in megabytes to allocate. If the amount of memory that needs to be allocated exceeds this value, then temporary files will be created for the excess. Generally, this value should be kept as high as possible. The process will become slower as the temporary files become larger. ═══ 5. Compress Options Dialog ═══ The Compress Options dialog box presents all of the settings that are related to compressing JPEG files. Select one of the following sections for information about a specific setting. o Quality o Restart o Smooth o Max Memory o Grayscale o Optimize o Force Targa Input o Add Comment ═══ 5.1. Quality ═══ This entry field specifies the quality of compression that is desired. The default and recommend value is 75. This results in very good compression and minimal loss in the compressed image. The quality setting lets you trade off compressed file size against quality of the reconstructed image: the higher the quality setting, the larger the JPEG file, and the closer the output image will be to the original input. Normally you want to use the lowest quality setting (smallest file) that decompresses into something visually indistinguishable from the original image. For this purpose the quality setting should be between 50 and 95; the default of 75 is often about right. If you see defects at -quality 75, then go up 5 or 10 counts at a time until you are happy with the output image. (The optimal setting will vary from one image to another.) A quality setting of 100 will generate a quantization table of all 1's, eliminating loss in the quantization step (but there is still information loss in subsampling, as well as roundoff error). This setting is mainly of interest for experimental purposes. Quality values above about 95 are NOT recommended for normal use; the compressed file size goes up dramatically for hardly any gain in output image quality. In the other direction, quality values below 50 will produce very small files of low image quality. Settings around 5 to 10 might be useful in preparing an index of a large image library, for example. Try -quality 2 (or so) for some amusing Cubist effects. (Note: quality values below about 25 generate 2-byte quantization tables, which are considered optional in the JPEG standard. Some commercial JPEG programs may be unable to decode the resulting file.) ═══ 5.2. Restart ═══ The restart option inserts extra markers that allow a JPEG decoder to resynchronize after a transmission error. Without restart markers, any damage to a compressed file will usually ruin the image from the point of the error to the end of the image; with restart markers, the damage is usually confined to the portion of the image up to the next restart marker. Of course, the restart markers occupy extra space. A restart value of 1 is recommended by the Independent JPEG Group for images that will be transmitted across unreliable networks such as Usenet. ═══ 5.3. Smooth ═══ The smooth option filters the input to eliminate fine-scale noise. This is often useful when converting GIF files to JPEG: a moderate smoothing factor of 10 to 50 gets rid of dithering patterns in the input file, resulting in a smaller JPEG file and a better-looking image. Too large a smoothing factor will visibly blur the image, however. ═══ 5.4. Max Memory ═══ This entry field specifies the maximum amount of memory in megabytes to allocate. If the amount of memory that needs to be allocated exceeds this value, then temporary files will be created for the excess. Generally, this value should be kept as high as possible. The process will become slower as the temporary files become larger. ═══ 5.5. Grayscale ═══ Check this option to produce a grayscale JPEG file from a color input file. You must check this option if the input file is a grayscale GIF because the software can't distinguish a grayscale GIF from a color GIF. Checking this will produce a JPEG file that is smaller and quicker to decompress. ═══ 5.6. Optimize ═══ Check this option to perform optimization of the entropy encoding parameters. This usually makes the resulting JPEG file a little smaller, but it takes more time and a lot more memory. This setting does not affect the image quality or the decompression time of the JPEG file produced. ═══ 5.7. Force Targa Input ═══ Check this option to force the input files to be treated as Targa files. This is useful when the Targa file has an "identification" field because that field is not automatically recognized by the software. Most Targa files should not need this setting. ═══ 5.8. Add Comment ═══ Check this option to cause Image Archiver to prompt you for a comment to be inserted into any JPEG file that it is creating. This feature is only available in the registered version. ═══ 6. Viewing Window ═══ This window allows the image to be scrolled, scaled to the size of the window, and zoomed in and out. The View menu option provides access to the functionality available with the mouse. Keyboard accelerators are also available. Select one of the following sections for more specific information. o View Menu and keyboard commands o Zooming with the mouse. ═══ 6.1. View Menu and Keyboard Commands ═══ In the current OS/2 2.1 beta, there are some significant bugs in the Palette Manager. First of all, any part of the image that is over-written with a menu or a dialog box will not be redrawn with the correct colors on Trident or ET4000 video cards. I believe that only the XGA palette manager works properly. (I'm not too sure about that one.) The other problem is that the image will only be properly rendered if it is drawn at it's actual size. This bug kind of limits the use of zooming and scaling, but hopefully the bug will be fixed with the release of 2.1 GA. Select one of the following selections for more specific information. o Zoom In (+) o Zoom Out (-) o Actual Size (=) o Scale to Window (F8) o Size to Image (F9) o Refresh (F10) ═══ 6.1.1. Zoom In (+) ═══ Select this menu item or press the + key to zoom in on the image by another 25%. The image starts out at 100% zoom. Repeatedly selecting this item will zoom in on the image in 25% increments, first to 125, then to 150, then to 175, etc. There is no zoom in limit. BETA The image is reset to the top left corner each time this is pressed. ═══ 6.1.2. Zoom Out (-) ═══ Select this menu item or press the - key to zoom out of the image by another 25%. The image starts out at 100% zoom. Repeatedly selecting this item will zoom out from the image in 25% increments, first to 75, then to 50, then to 25. 25 percent is the zoom out limit. BETA The image is reset to the top left corner each time this is pressed. ═══ 6.1.3. Actual Size (=) ═══ Select this menu item to return the image to its actual size. This returns the image to 100% zoom. ═══ 6.1.4. Scale to Window (F8) ═══ Select this menu item to scale the image so that it fits entirely with in the window. The image's aspect ratio is kept, both the width and height of the image is scale by the same factor. ═══ 6.1.5. Size to Image (F9) ═══ Select this menu item to size the window to fit as much of the picture within it as it can. If the picture is larger than the maximum size of the window, then the window is set to the largest size possible, still keeping all borders on the screen. The window is not maximized. This can be set to happen automatically with the Size Window to Picture option. ═══ 6.1.6. Refresh (F10) ═══ Select this menu item to refresh the image. This option is required because of the few significant bugs in the 2.1 beta's Palette Manager. ═══ 6.2. Zooming with the mouse ═══ Image Archiver provides a very powerful method of zooming into an arbitrary area of an image. Follow thses simple instructions to zoom in to any part of the image to any detail level. 1. Move the mouse pointer to approximately the top left corner of the part of the image that you wish to zoom into. 2. Press and hold down mouse button 1. 3. Continue to hold down mouse button 1 and drag the mouse pointer to approxiamtely the bottom right of the area. A tracking rectangle will follow the pointer showing the area that will be zoomed into. 4. Release mouse button 1 to see the selected area. This option only works when the image is being viewed in it's Actual Size. BETA There are still a few bugs in this zooming system. I recommend selecting Actual Size and Size to Image before attempting any arbitrary zoom operation with the mouse. ═══ 7. Acknowledgements ═══ Image Archiver is based in part on the work of the Independent JPEG Group. This work includes both code and documentation. I'd like to pass on my thanks to Tom Lane and the others of IJG on the work they have done to provide very functional code to the rest of us in the programming world. Good job people! I'd also like to thank the following people for their contributions to my sanity: o Guy Scharf, president of Software Architects. Thanks for the wonderful and very helpful articles on both container and slider controls. o Peter Nielsen, author of PMView (check it out, it's a great viewer). Thanks for help with the Palette Manager and all it's wonderful little quirks in the OS/2 2.1 beta incarnation. o Everyone else on the Internet. Thanks for all the answered questions, sample code, moral support, etc. Image Archiver wouldn't exist without you all. "The Graphics Interchange Format(c) is the Copyright property of CompuServe Incorporated. GIF(sm) is a Service Mark property of CompuServe Incorporated."